package net.sx.minemodule.mvp.activities;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.homegoods.aroutercomment.ARouterPath;
import com.kedll.library.base.MyBaseFragmentActivity;

import net.sx.minemodule.R;
import net.sx.minemodule.databinding.MineActivityMineYieldsBinding;
import net.sx.minemodule.mvp.presenters.MineYieldPresenter;

/**
 * 我的收益
 * @author 11470
 */
@Route(path = ARouterPath.PATH_MINE_YIELD)
public class MineYieldsActivity extends MyBaseFragmentActivity<MineActivityMineYieldsBinding, MineYieldPresenter> {

    @Override
    protected void initToolBar(Bundle savedInstanceState) {
        super.initToolBar(savedInstanceState);
        toolbar.setNavigationOnClickListener(v -> finish());

        setTopLeftButton(0, null);
        setTopRightButton("提现记录", v -> mPresenter.withdrawRecord());
    }

    @Override
    protected MineYieldPresenter getPresenter() {
        return new MineYieldPresenter();
    }

    @Override
    protected int getLayout() {
        return R.layout.mine_activity_mine_yields;
    }

    @Override
    protected void initEvent() {
        mBinding.setPresenter(mPresenter);
        mPresenter.load();
    }
}
